#ifndef SHIJU_LIDUN_XA_MSG_FACTORY_H
#define SHIJU_LIDUN_XA_MSG_FACTORY_H
#include "zhongdun_xa_msgDef.h"

bool parse_MSG_START_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_START_REQ& msgRef);
bool build_MSG_START_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_START_REQ& msgRef);

bool parse_MSG_START_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_START_ACK& msgRef);
bool build_MSG_START_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_START_ACK& msgRef);

bool parse_MSG_CONFIG_REPORT_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_CONFIG_REPORT_REQ& msgRef);
bool build_MSG_CONFIG_REPORT_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_CONFIG_REPORT_REQ& msgRef);

bool parse_MSG_CONFIG_REPORT_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_CONFIG_REPORT_ACK& msgRef);
bool build_MSG_CONFIG_REPORT_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_CONFIG_REPORT_ACK& msgRef);

bool parse_MSG_SET_DATETIME_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_SET_DATETIME_REQ& msgRef);
bool build_MSG_SET_DATETIME_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_SET_DATETIME_REQ& msgRef);

bool parse_MSG_SET_DATETIME_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SET_DATETIME_ACK& msgRef);
bool build_MSG_SET_DATETIME_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SET_DATETIME_ACK& msgRef);

bool parse_MSG_SET_BTS_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_SET_BTS_REQ& msgRef);
bool build_MSG_SET_BTS_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_SET_BTS_REQ& msgRef);

bool parse_MSG_SET_BTS_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SET_BTS_ACK& msgRef);
bool build_MSG_SET_BTS_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SET_BTS_ACK& msgRef);

bool parse_MSG_USER_REPORT_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_USER_REPORT_REQ& msgRef);
bool build_MSG_USER_REPORT_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_USER_REPORT_REQ& msgRef);

bool parse_MSG_GET_HISTORY_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_GET_HISTORY_REQ& msgRef);
bool build_MSG_GET_HISTORY_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_GET_HISTORY_REQ& msgRef);

bool parse_MSG_GET_HISTORY_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_GET_HISTORY_ACK& msgRef);
bool build_MSG_GET_HISTORY_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_GET_HISTORY_ACK& msgRef);

bool parse_MSG_HEARTBEAT_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_HEARTBEAT_REQ& msgRef);
bool build_MSG_HEARTBEAT_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_HEARTBEAT_REQ& msgRef);

bool parse_MSG_WARNING_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_WARNING_REQ& msgRef);
bool build_MSG_WARNING_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_WARNING_REQ& msgRef);

bool parse_MSG_RESET_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_RESET_REQ& msgRef);
bool build_MSG_RESET_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_RESET_REQ& msgRef);

bool parse_MSG_RESET_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_RESET_ACK& msgRef);
bool build_MSG_RESET_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_RESET_ACK& msgRef);

bool parse_MSG_SET_CONTROL_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_SET_CONTROL_REQ& msgRef);
bool build_MSG_SET_CONTROL_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_SET_CONTROL_REQ& msgRef);

bool parse_MSG_SET_CONTROL_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SET_CONTROL_ACK& msgRef);
bool build_MSG_SET_CONTROL_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SET_CONTROL_ACK& msgRef);

bool parse_MSG_CONTROL_OPTION_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_CONTROL_OPTION_REQ& msgRef);
bool build_MSG_CONTROL_OPTION_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_CONTROL_OPTION_REQ& msgRef);

bool parse_MSG_CONTROL_OPTION_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_CONTROL_OPTION_ACK& msgRef);
bool build_MSG_CONTROL_OPTION_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_CONTROL_OPTION_ACK& msgRef);

bool parse_MSG_RSSI_REPORT_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_RSSI_REPORT_REQ& msgRef);
bool build_MSG_RSSI_REPORT_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_RSSI_REPORT_REQ& msgRef);

bool parse_MSG_SMS_RECV_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_SMS_RECV_REQ& msgRef);
bool build_MSG_SMS_RECV_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_SMS_RECV_REQ& msgRef);

bool parse_MSG_CALL_RECV_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_CALL_RECV_REQ& msgRef);
bool build_MSG_CALL_RECV_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_CALL_RECV_REQ& msgRef);

bool parse_MSG_GET_VERSION(uint8_t* msgData, uint32_t& msgSize, MSG_GET_VERSION& msgRef);
bool build_MSG_GET_VERSION(uint8_t* msgData, uint32_t& msgSize, MSG_GET_VERSION& msgRef);

bool parse_MSG_GET_VERSION_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_GET_VERSION_ACK& msgRef);
bool build_MSG_GET_VERSION_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_GET_VERSION_ACK& msgRef);

bool parse_MSG_SEND_PACKET(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_PACKET& msgRef);
bool build_MSG_SEND_PACKET(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_PACKET& msgRef);

bool parse_MSG_SEND_PACKET_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_PACKET_ACK& msgRef);
bool build_MSG_SEND_PACKET_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_PACKET_ACK& msgRef);

bool parse_MSG_DOWNLOAD_END(uint8_t* msgData, uint32_t& msgSize, MSG_DOWNLOAD_END& msgRef);
bool build_MSG_DOWNLOAD_END(uint8_t* msgData, uint32_t& msgSize, MSG_DOWNLOAD_END& msgRef);

bool parse_MSG_GET_HISTORY_INFOMATION_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_GET_HISTORY_INFOMATION_REQ& msgRef);
bool build_MSG_GET_HISTORY_INFOMATION_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_GET_HISTORY_INFOMATION_REQ& msgRef);

bool parse_HISTORY_INFO_RECORD(uint8_t* msgData, uint32_t& msgSize, HISTORY_INFO_RECORD& msgRef);
bool build_HISTORY_INFO_RECORD(uint8_t* msgData, uint32_t& msgSize, HISTORY_INFO_RECORD& msgRef);

bool parse_MSG_GET_HISTORY_INFOMATION_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_GET_HISTORY_INFOMATION_ACK& msgRef);
bool build_MSG_GET_HISTORY_INFOMATION_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_GET_HISTORY_INFOMATION_ACK& msgRef);

bool parse_MSG_SEND_RECORD_SELECT(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_RECORD_SELECT& msgRef);
bool build_MSG_SEND_RECORD_SELECT(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_RECORD_SELECT& msgRef);

bool parse_MSG_SEND_RECORD_SELECT_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_RECORD_SELECT_ACK& msgRef);
bool build_MSG_SEND_RECORD_SELECT_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_RECORD_SELECT_ACK& msgRef);

bool parse_MSG_SEND_RECORD_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_RECORD_REQ& msgRef);
bool build_MSG_SEND_RECORD_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_RECORD_REQ& msgRef);

bool parse_MSG_SEND_RECORD_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_RECORD_ACK& msgRef);
bool build_MSG_SEND_RECORD_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_RECORD_ACK& msgRef);

bool parse_MSG_SEND_RECORD_END(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_RECORD_END& msgRef);
bool build_MSG_SEND_RECORD_END(uint8_t* msgData, uint32_t& msgSize, MSG_SEND_RECORD_END& msgRef);

bool parse_MSG_GET_BTS_INFO_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_GET_BTS_INFO_REQ& msgRef);
bool build_MSG_GET_BTS_INFO_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_GET_BTS_INFO_REQ& msgRef);

bool parse_MSG_GET_BTS_INFO_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_GET_BTS_INFO_ACK& msgRef);
bool build_MSG_GET_BTS_INFO_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_GET_BTS_INFO_ACK& msgRef);

bool parse_MSG_GET_TIME_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_GET_TIME_REQ& msgRef);
bool build_MSG_GET_TIME_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_GET_TIME_REQ& msgRef);

bool parse_MSG_GET_TIME_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_GET_TIME_ACK& msgRef);
bool build_MSG_GET_TIME_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_GET_TIME_ACK& msgRef);

bool parse_MSG_DELETE_USERDATA_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_DELETE_USERDATA_REQ& msgRef);
bool build_MSG_DELETE_USERDATA_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_DELETE_USERDATA_REQ& msgRef);

bool parse_MSG_DELETE_USERDATA_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_DELETE_USERDATA_ACK& msgRef);
bool build_MSG_DELETE_USERDATA_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_DELETE_USERDATA_ACK& msgRef);

bool parse_MSG_RF_POWER_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_RF_POWER_REQ& msgRef);
bool build_MSG_RF_POWER_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_RF_POWER_REQ& msgRef);

bool parse_MSG_RF_POWER_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_RF_POWER_ACK& msgRef);
bool build_MSG_RF_POWER_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_RF_POWER_ACK& msgRef);

bool parse_MSG_SCAN_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_SCAN_REQ& msgRef);
bool build_MSG_SCAN_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_SCAN_REQ& msgRef);

bool parse_SCAN_NEIGH_INFO(uint8_t* msgData, uint32_t& msgSize, SCAN_NEIGH_INFO& msgRef);
bool build_SCAN_NEIGH_INFO(uint8_t* msgData, uint32_t& msgSize, SCAN_NEIGH_INFO& msgRef);

bool parse_SCAN_BEST_FREQ_INFO(uint8_t* msgData, uint32_t& msgSize, SCAN_BEST_FREQ_INFO& msgRef);
bool build_SCAN_BEST_FREQ_INFO(uint8_t* msgData, uint32_t& msgSize, SCAN_BEST_FREQ_INFO& msgRef);

bool parse_MSG_SCAN_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SCAN_ACK& msgRef);
bool build_MSG_SCAN_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_SCAN_ACK& msgRef);

bool parse_XML_SCAN_BCCH_INFO(uint8_t* msgData, uint32_t& msgSize, XML_SCAN_BCCH_INFO& msgRef);
bool build_XML_SCAN_BCCH_INFO(uint8_t* msgData, uint32_t& msgSize, XML_SCAN_BCCH_INFO& msgRef);

bool parse_MSG_XML_SCAN_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_XML_SCAN_ACK& msgRef);
bool build_MSG_XML_SCAN_ACK(uint8_t* msgData, uint32_t& msgSize, MSG_XML_SCAN_ACK& msgRef);

bool parse_MSG_GPSINFO_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_GPSINFO_REQ& msgRef);
bool build_MSG_GPSINFO_REQ(uint8_t* msgData, uint32_t& msgSize, MSG_GPSINFO_REQ& msgRef);

#endif
